/**
 * 北京钉图互动科技 all right reserver
 */
package com.sincebest.fivestar.common.exception;

/**
 * 
 * @author Liutao
 * @since 2016年7月18日
 */
public class CustomValidateException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8194570751531462995L;
	private final String validMsg;
	private final String validDetailMsg;

	/**
	 * 
	 * @param validMsg
	 * @param validDetailMsg
	 */
	public CustomValidateException(String validMsg,String validDetailMsg) {
		super();
		this.validDetailMsg = validDetailMsg;
		this.validMsg = validMsg;
	}
	
	/**
	 * 
	 * @param validMsg
	 */
	public CustomValidateException(String validMsg) {
		super();
		this.validDetailMsg = null;
		this.validMsg = validMsg;
	}

	/**
	 * 
	 * @param validMsg
	 * @param cause
	 */
	public CustomValidateException(String validMsg, Throwable cause) {
		super(validMsg, cause);
		this.validMsg=validMsg;
		this.validDetailMsg = null;
	}

	public String getValidMsg() {
		return validMsg;
	}
	
	public String getValidDetailMsg() {
		return validDetailMsg;
	}
	
	@Override
	public String getMessage() {
		return this.validMsg;
	}

}
